<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sec="http://www.springframework.org/security/tags">

<body>
	<ui:composition>
		<div id="header" class="ui-widget ui-widget-header">
			<div id="logo">
				<img src="#{request.contextPath}/resources/default/images/logo.png" alt="Logo" />
			</div>

			<div id="menu" class="ui-widget">
				<ul id="main">
					<li class="current_page_item"><a href="#{request.contextPath}/ui/home.jsf" style="background: url('resources/default/images/design/ui.png') no-repeat center left;">PrimeUI</a></li>
					<li><a href="#{request.contextPath}/mobile/index.jsf" style="background: url('resources/default/images/design/iphone.png') no-repeat center left;">PrimeMobile</a></li>
					<li><a href="#{request.contextPath}/push/index.jsf" style="background: url('resources/default/images/design/push.png') no-repeat center left">PrimePush</a></li>
					<li class="current_page_item"><a href="#{request.contextPath}/ui/macosx.jsf" style="background: url('resources/default/images/design/mac.png') no-repeat center left;">Mock OS X</a></li>
				</ul>
			</div>

			<div id="globalthemeswitcher">
				<ui:remove>
					<h:form>
						<p:themeSwitcher value="#{themeSwitcherBean.theme}"
							style="width:175px;" effect="fade" var="t">
							<f:selectItem itemLabel="Choose Theme" itemValue="" />
							<f:selectItems value="#{themeSwitcherBean.advancedThemes}"
								var="theme" itemLabel="#{theme.name}" itemValue="#{theme}" />
							<p:ajax listener="#{themeSwitcherBean.saveTheme}" />

							<p:column>
								<h:graphicImage name="images/themes/#{t.image}" />
							</p:column>

							<p:column>
                            #{t.name}
                        </p:column>
						</p:themeSwitcher>
					</h:form>
				</ui:remove>

				<h:form id="localeManager">
					
						<h:outputText value="#{msg.language}" />: 
		                <h:selectOneMenu value="#{localeManager.language}" onchange="submit()" valueChangeListener="#{localeManager.countryLocaleCodeChanged}">
							<f:selectItems value="#{localeManager.countriesInMap}" />
						</h:selectOneMenu>

				</h:form>
				
				 <div class="nav-collapse pull-right">
                        <p class="navbar-text pull-left">
                            <h:outputText value="Welcome, #{facesContext.externalContext.remoteUser}"
                                rendered="#{not empty facesContext.externalContext.remoteUser}"/>
                        </p>
                        <ul class="nav">
                            <li>
                                <h:outputLink value="${request.contextPath}/j_spring_security_logout"
                                    rendered="#{sec:isAllowed('/j_spring_security_logout','GET')}">
                                    <f:verbatim>Logout</f:verbatim>
                                </h:outputLink>
                            </li>
                        </ul>
                    </div>

			</div>
		</div>




	</ui:composition>
</body>
</html>